package com.docmgmt.mvp.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统通知表
 * </p>
 *
 * @author Dora
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("collab_notification")
public class NotificationEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通知ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 接收人ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 通知类型：mention/share/comment/system
     */
    @TableField("type")
    private String type;

    /**
     * 通知标题
     */
    @TableField("title")
    private String title;

    /**
     * 通知内容
     */
    @TableField("content")
    private String content;

    /**
     * 跳转链接（v3.0新增）
     */
    @TableField("link")
    private String link;

    /**
     * 发送人ID（v3.0新增）
     */
    @TableField("sender_id")
    private Long senderId;

    /**
     * 是否已读：1是 0否
     */
    @TableField("is_read")
    private Byte isRead;

    /**
     * 已读时间
     */
    @TableField("read_at")
    private LocalDateTime readAt;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
